package sk.sigp.aobot.base;

import java.util.Comparator;

public class BuddyComparator implements Comparator<Buddy> {
	public int compare(Buddy o1, Buddy o2) {
		if (o1.online < o2.online)
			return 1;
		if (o1.online > o2.online)
			return -1;
		if (o1.name.compareTo(o2.name) < 0)
			return -1;
		else
			return 1;
	}
}	